# Group Admin Sales

**Sales:**

| Parameter | Description | Type |
|:----------|-------------|------|
| `name` | Name of event | String |
| `sales` | sales block | Object |
| `starts_at` | Start time of event | String |
| `ends_at` | End time of event | String |
| `fee-percentage` | Fee percentage | Float |
| `payment-currency` | Currency of event | String |
| `revenue` | Total revenue | Integer |
| `ticket-count` | Number of tickets sold | Float |
| `location_name` | Place of event | String |
| `first_name` | First name of organizer | String |
| `last_name` | Last name of organizer | String |
| `email` | Email of marketer | String |
| `fullname` | Full name of marketer | String |

## Sales by Events Details [/v1/admin/sales/by-events{?page%5bsize%5d,page%5bnumber%5d,sort,filter}]
+ Parameters
    + page%5bsize%5d (optional, integer, `10`) - Maximum number of resources in a single paginated response.
    + page%5bnumber%5d (optional, integer, `2`) - Page number to fetched for the paginated response.
    + sort (optional, string, `name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
    + filter(optional, string, ``) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.


### Show Sales by Events [GET]

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "data": [{
            "type": "admin-sales-by-events",
            "attributes": {
                "name": "Event name",
                "ends_at": "2018-08-08T15:00:02.394000+00:00",
                "sales": {
                    "placed": {
                        "sales_total": 0,
                        "ticket_count": 0
                    },
                    "completed": {
                        "sales_total": 0,
                        "ticket_count": 0
                    },
                    "pending": {
                        "sales_total": 0,
                        "ticket_count": 0
                    }
                },
                "starts_at": "2018-08-07T22:00:00+00:00"
            },
            "id": "1",
            "links": {
                "self": "/v1/admin/sales/by-events"
            }
            }],
            "links": {
                "self": "/v1/admin/sales/by-events"
            },
            "meta": {
                "count": 1
            },
            "jsonapi": {
                "version": "1.0"
            }
        }

## Sales by Organizers Details [/v1/admin/sales/by-organizers{?page%5bsize%5d,page%5bnumber%5d,sort,filter}]
+ Parameters
    + page%5bsize%5d (optional, integer, `10`) - Maximum number of resources in a single paginated response.
    + page%5bnumber%5d (optional, integer, `2`) - Page number to fetched for the paginated response.
    + sort (optional, string, `first_name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
    + filter(optional, string, ``) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.



### Show Sales by Organizers [GET]

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "data": [{
                "type": "admin-sales-by-organizers",
                "attributes": {
                    "first_name": null,
                    "last_name": null,
                    "sales": {
                        "placed": {
                            "sales_total": 0,
                            "ticket_count": 0
                        },
                        "completed": {
                            "sales_total": 0,
                            "ticket_count": 0
                        },
                        "pending": {
                            "sales_total": 0,
                            "ticket_count": 0
                        }
                    }
                },
                "id": "1",
                "links": {
                    "self": "/v1/admin/sales/by-organizers"
                }
            }],
            "links": {
                "self": "/v1/admin/sales/by-organizers"
            },
            "meta": {
                "count": 1
            },
            "jsonapi": {
                "version": "1.0"
            }
        }


## Sales by Location Details [/v1/admin/sales/by-location]


### Show Sales by Location [GET]

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "data": [{
                "type": "admin-sales-by-location",
                "attributes": {
                    "location_name": "Berlin, Germany",
                    "sales": {
                        "placed": {
                            "sales_total": 0,
                            "ticket_count": 0
                        },
                        "completed": {
                            "sales_total": 0,
                            "ticket_count": 0
                        },
                        "pending": {
                            "sales_total": 0,
                            "ticket_count": 0
                        }
                    }
                },
                "links": {
                    "self": "/v1/admin/sales/by-location"
                }
            }],
            "links": {
                "self": "/v1/admin/sales/by-location"
            },
            "meta": {
                "count": 1
            },
            "jsonapi": {
                "version": "1.0"
            }
        }

## Sales by Marketer Details [/v1/admin/sales/by-marketer]


### Show Sales by Marketer [GET]

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "data": [{
            "type": "admin-sales-by-marketer",
            "attributes": {
                "fullname": null,
                "email": null,
                "sales": {
                    "placed": {
                        "sales_total": 0,
                        "ticket_count": 0
                    },
                    "completed": {
                        "sales_total": 0,
                        "ticket_count": 0
                    },
                    "pending": {
                        "sales_total": 0,
                        "ticket_count": 0
                    }
                }
            },
            "id": "1",
            "links": {
                "self": "/v1/admin/sales/by-marketer"
            }
            }],
            "links": {
                "self": "/v1/admin/sales/by-marketer"
            },
            "meta": {
                "count": 1
            },
            "jsonapi": {
                "version": "1.0"
            }
        }


## Sales discounted Details [/v1/admin/sales/discounted]


### Show Sales Discounted  [GET]

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "data": [],
            "links": {
                "self": "/v1/admin/sales/discounted"
            },
            "meta": {
                "count": 0
            },
            "jsonapi": {
                "version": "1.0"
            }
        }

## Sales invoice detail [/v1/admin/sales/invoices]


### Show Sales Invoices  [GET]

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "data": [],
            "links": {
                "self": "/v1/admin/sales/invoices"
            },
            "meta": {
                "count": 0
            },
            "jsonapi": {
                "version": "1.0"
            }
        }

## Fees Sales Details [/v1/admin/sales/fees]


### Show Sales Fees [GET]

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)


        {
            "data": [
                {
                    "type": "admin-sales-fees",
                    "attributes": {
                        "name": "event 1",
                        "fee-percentage": 20.0,
                        "revenue": 10,
                        "ticket-count": 42.0,
                        "payment-currency": "USD"
                    },
                    "id": "1",
                    "links": {
                        "self": "/v1/admin/sales/fees"
                    }
                },
                {
                    "type": "admin-sales-fees",
                    "attributes": {
                        "name": "event 2",
                        "fee-percentage": 20.0,
                        "revenue": 0,
                        "ticket-count": 3.0,
                        "payment-currency": "USD"
                    },
                    "id": "2",
                    "links": {
                        "self": "/v1/admin/sales/fees"
                    }
                }
            ],
            "links": {
                "self": "/v1/admin/sales/fees"
            },
            "meta": {
                "count": 5
            },
            "jsonapi": {
                "version": "1.0"
            }
        }
